package com.qijian.maindata.domain.excel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import lombok.Data;

@Data
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND,
        fillForegroundColor = 55,
        borderBottom = BorderStyleEnum.THIN,
        borderLeft = BorderStyleEnum.THIN,borderRight = BorderStyleEnum.THIN,borderTop = BorderStyleEnum.THIN)//表头样式
@ColumnWidth(15)
public class InspectionExcelVo {


    @ExcelProperty(value = {"检验方案","开工令"},index = 0)
    private String projectMachineNo;

    @ExcelProperty(value = {"检验方案","检验类型"},index = 1)
    @ColumnWidth(50)
    private String inspectionType;

    @ExcelProperty(value = {"检验方案","检验班组"},index = 2)
    private String checkTypeName;

    @ExcelProperty(value = {"检验方案","检验方案名称"},index = 3)
    private String schemeName;

    //序号，用于匹配上传
    @ExcelProperty(value = {"检验项目","序号"},index = 4)
    private String itemIndex;

    @ExcelProperty(value = {"检验项目","检验项目"},index = 5)
    private String schemeItemName;

    @ExcelProperty(value = {"检验项目","自检方法"},index = 6)
    private String selfMethod;

    @ExcelProperty(value = {"检验项目","检验标准"},index = 7)
    private String checkStandard;

    @ExcelProperty(value = {"检验项目","专检方法"},index = 8)
    private String specMethod;

    @ExcelProperty(value = {"检验项目","说明"},index = 9)
    private String checkRemarks;

//    @ExcelProperty(value = {"检验项目","检验工具"},index = 9)
//    private String checkTools;

//    @ExcelProperty(value = {"检验项目","检验（判定）依据"},index = 9)
//    @ColumnWidth(20)
//    private String requirements;

    @ExcelProperty(value = {"检验特性","特性及要求"},index = 10)
    @ColumnWidth(30)
    private String itemDetailName;

    @ExcelProperty(value = {"检验特性","上限值"},index = 11)
    private String maxValue;
    @ExcelProperty(value = {"检验特性","下限值"},index = 12)
    private String minValue;
    @ExcelProperty(value = {"检验特性","默认值"},index = 13)
    private String defaultValue;

    @ExcelProperty(value = {"检验特性","是否自检"},index = 14)
    private String selfCheck;

    @ExcelProperty(value = {"检验特性","是否专检"},index = 15)
    private String specCheck;

    @ExcelProperty(value = {"检验特性","自检频次"},index = 16)
    private String frequency;

    @ExcelProperty(value = {"检验特性","专检频次"},index = 17)
    private String specFrequency;


    //补全bomId的字段，好做匹配
    @ExcelIgnore
    private Long bomId;

    /***
     * bomId+inspectionType+schemeName确定唯一
     * @return
     */
    public String getUniqueKey(){
        return bomId+":"+inspectionType+":"+schemeName;
    }
}
